<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{$site_title}</title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="stylesheet" type="text/css" href="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.css" />
  <link rel="stylesheet" type="text/css" href="{$resource_basic}/css/webapp.css" />
  <script type="text/javascript" src="{$resource_basic}/js/jquery.min.js"></script>
  <script type="text/javascript" src="http://apps.bdimg.com/libs/blendui/2.0.0/boost.min.js"></script>
  <script type="text/javascript">
    window.boost = $.noConflict(true);
    </script>
  <style>
      .blend-panel{background-color: #fff;}
      .blend-suggest-input-blue .blend-suggest-ico{
          background-color: #03ab9e;
      }
      .blend-suggest-arrow:before{
          color: #fff;
      }
      .blend-list{ padding: 0 10px; background-color: #fff;}
      .blend-card-content-view{
          max-height: 90px;
      }
      .blend-button-primary{
          background-color: #03ab9e;
          border-color: #03ab9e;
      }
      .blend-button-primary:active{
          background-color: #03ab9e;
          border-color: #03ab9e;
      }
      .blend-button-primary:focus{
          background-color: #03ab9e;
          border-color: #03ab9e;
      }
      
      .blend-button-primary:visited{
          background-color: #03ab9e;
          border-color: #03ab9e;
      }
  </style>
</head>

<body>
    
        <header data-blend-widget="header" class="blend-header header_title_bg">
        <span class="blend-header-left">
            <a class="blend-header-item  blend-button" href="javascript:history.go(-1);"><img src="{$resource_basic}/img/btn_back.png" style="height:28px;"/></a>
        </span>
        <span class="blend-header-title">
            <a class="blend-header-item">搜索商品</a>
        </span>
        <span class="blend-header-right">
        </span>
    </header>
    
    <div class="main-content">
        
       <div class="blend-suggest-wrap2 mar-t-10" id="inputGray2">
        <div class="blend-suggest">
           <div class="blend-suggest-input-gray">
               <input class="blend-suggest-wd" id='input_search' type="search" placeholder="输入您想要搜索的商品">
               <a href="javascript:;" class="blend-suggest-delete"></a>
               <span class="blend-suggest-ico" id='action_search'></span>
           </div>
        </div>
    </div>
        <empty name="results">
            <div class="blend-panel">
        
                <div class="blend-panel-body" style='text-align: center;'>
                    没有找到您搜索的内容<br/>
                    <a class="blend-button blend-button-primary"  href="{:U('M/Founding/publish')}">马上发起</a>
                </div>
            </div>
            <else/>
            <div id="result_list">
            <volist name="results" id="vo">
                <if condition='$vo.isurl eq 1'>
                    <a href='{$vo.url}'>
                        <else/>
                        <a href="{:U('M/Founding/detail_new',array('fdid'=>$vo['id'],'from_channel'=>1))}">
                    </if>

                    <div class="blend-card blend-card-no-icon" style="height:100px;">
                        <div class="blend-card-content-view" style="width:75%;float: left;">
                            <div class="blend-card-title">
                               {$vo.name}
                            </div>
                            <if condition='$vo.isshow_batch eq 1'>
                            <div class="blend-card-sub-title">生产日期/批号:{$vo.batch_number}</div>
                            </if>
                            <if condition="$vo.state eq 1">
                                <!--众筹中的-->
                                <div class="blend-card-sub-title">检测内容: {$vo.packagename}</div>
                                <elseif condition="$vo.state eq 2"/>
                                <!--抽检中的-->
                                <div class="blend-card-sub-title">检测内容: {$vo.packagename}</div>
                                <else/>
                                <!--完成的-->
                                <if condition='$vo.qualified eq 0'>
                                <div class="blend-card-sub-title" style=" color:red;">{$vo.testing_result}</div>
                                </if>
                                <if condition='$vo.qualified eq 2'>
                                <div class="blend-card-sub-title" style=" color:red;">{$vo.testing_result}</div>
                                </if>
                            </if>
                            

                        </div>
                        <div class="blend-card-img-view" style="float: right;">
                            <img src="{$resource_basic}{$vo.show_mark_icon}">
                        </div>

                    </div>
                    </a>
            </volist>
                </div>
             <button class="blend-button blend-button-primary blend-button-large" id="loading_more">加载更多</button>
        </empty>
       
        
        
    </div>
    
    
    
    <!--菜单入口-->
    
    <!--菜单入口 end-->
    
    
    <!--最新检测结果列表-->
    
    
    <!--最新检测结果end-->
   <include file="Index/wx_share_clip"/>  
    
<script type="text/javascript" src="{$resource_basic}/js/handlebars.min.js"></script>
<script type="text/x-handlebars-template" id="tpi-list-item">
  {{#each this}}
    <a href='{{url}}'>
        <div class="blend-card blend-card-no-icon" style="height:100px;">
            <div class="blend-card-content-view" style="width:75%;float: left;">
                <div class="blend-card-title">
                {{name}}
                </div>
                <div class="blend-card-sub-title">生产日期/批号:{{batch_number}}</div>
                <div class="blend-card-sub-title">检测日期:{{testing_date}}</div>
                <div class="blend-card-sub-title">抽样地:{{location}}</div>

            </div>
            <div class="blend-card-img-view" style="float: right;">
                <img src="{$resource_basic}{{show_mark_icon}}">
            </div>

        </div>
    </a>
  {{/each}}
</script>
<script>
$(function(){
    open_loading();
    
    $("#action_search").on('click',function(){
         var keyword = $('#input_search').val();
         top.location.href="{:U('lists')}?keywords="+keyword;
     });
     
     var generatedCount=0;
     
     $("#loading_more").click(function(){
        open_loading();
        generatedCount++;   
          
            
            /*
            * 获取更多的美容师列表
            */
           $.ajax({ 
                   type: 'GET', 
                   url: '{:U("M/Search/list_by_page")}', 
                   dataType: 'json', 
                   data:"pagecount="+generatedCount+"&keywords={$keywords}",
                   cache: false, 
                   error: function(){ 
                       return false; 
                   }, 
                   success:function(json){ 
                        close_loading();
                        if(json.err===0)
                        {
                            var template = Handlebars.compile($('#tpi-list-item').html());
                            var html = template(json.res);
                            $("#result_list").append(html);
                        }
                        else
                        {
                            alert(json.msg);
                            $("#loading_more").text(json.msg);
                        }
                        
                   } 
               });
        });
        
});
// 加载的loading...
 document.onreadystatechange = subSomething;//当页面加载状态改变的时候执行这个方法. 
    function subSomething() 
    { 
        if(document.readyState === "complete") //当页面加载状态 
        {
            close_loading();

        }
    }
 
    function open_loading()
    {
        var loading = boost.blend.loading();
        loading.show();
    }
    
    function close_loading()
    {
        $('.blend-loading').hide();
    }
</script>
<?php require_once 'cs.php';echo '<img src="'._cnzzTrackPageView(1256622573).'" width="0" height="0"/>';?>
<include file="Index/foot_analyze"/>
</body>
</html>